package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_credit_points", autoSave = true)
public class LogCreditPoints {
    @FieldTypeAnnotation(isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "注册时间")
    private Date registerTime;
    @FieldTypeAnnotation(desc = "vip等级")
    private int vipLv;
    @FieldTypeAnnotation(desc = "原禁言结束时间")
    private Date oldBannedTime;
    @FieldTypeAnnotation(desc = "增加的禁言时间")
    private int addBannedTime;
    @FieldTypeAnnotation(desc = "原信用分")
    private long oldCreditPoints;
    @FieldTypeAnnotation(desc = "增加的信用分")
    private int addCreditPoints;
    @FieldTypeAnnotation(desc = "新的信用分")
    private long newCreditPoints;
    @FieldTypeAnnotation(desc = "是否被禁言")
    private boolean isBanned;
    @FieldTypeAnnotation(desc = "时间")
    private Date time;

    public LogCreditPoints(long userId, long registerTime, int vipLv, long oldBannedTime, int addBannedTime,
                           long oldCreditPoints, int addCreditPoints, long newCreditPoints, boolean isBanned) {
        this.userId = userId;
        this.registerTime = new Date(registerTime);
        this.vipLv = vipLv;
        this.oldBannedTime = new Date(oldBannedTime);
        this.addBannedTime = addBannedTime;
        this.oldCreditPoints = oldCreditPoints;
        this.addCreditPoints = addCreditPoints;
        this.newCreditPoints = newCreditPoints;
        this.isBanned = isBanned;
        this.time = new Date();
    }
}
